<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Users</title>
</head>
<body>

	<c:if test="${ empty usersList }">
		-- no users --
	</c:if>

	<c:if test="${ not empty usersList }">
		<table>
			<thead>
				<tr>
					<th>Username</th>
					<th>Firstname</th>
					<th>Lastname</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="currentUser" items="${ usersList }">
					<tr>
						<td><a
							href="${pageContext.request.contextPath}/${currentUser.username}">${ currentUser.username }</a></td>
						<td>${ currentUser.firstname }</td>
						<td>${ currentUser.lastname }</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:if>

</body>
</html>